# Maintainer:  Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=go-nuid
_pkgname=nuid
_vendor="nats-io"
pkgver=1.0.0
pkgrel=3
pkgdesc="NATS Unique Identifiers"
url="https://github.com/$_vendor/$_pkgname"
arch="noarch"
license="MIT"
depends="go"
subpackages="$pkgname-doc"
options="!check" # no testsuite
source="$pkgname-$pkgver.tar.gz::https://github.com/$_vendor/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	return 0
}

package() {
	cd "$builddir"
	mkdir -p "$pkgdir"/usr/share/doc/$_vendor/$pkgname \
		"$pkgdir"/usr/lib/go/src/vendor/github.com/$_vendor/$_pkgname
	for file in \
		LICENSE \
		README.* \
		COPYRIGHT \
		AUTHORS \
		; do \
		test -e $file && mv $file "$pkgdir"/usr/share/doc/$_vendor/$pkgname
	done
	mv * "$pkgdir"/usr/lib/go/src/vendor/github.com/$_vendor/$_pkgname
}

sha512sums="b4a02aae9b29ee00bc482d7eda6ff9fdb1e64419e0d728ce4c1180027e6e4846444ace2376abf7a0f597c5e08a27594708d48257348555b1c611d6a588e2a734  go-nuid-1.0.0.tar.gz"
